<!-- components/navigation/MobileMask.vue -->
<template>
  <div 
    class="mobile-mask" 
    :class="{ show: isOpen }"
    @click="handleClose"
  ></div>
</template>

<script setup lang="ts">
// @ts-nocheck
// 移动端遮罩组件

const props = withDefaults(defineProps<{
  isMobile?: boolean
  isOpen?: boolean
}>(), {
  isMobile: false,
  isOpen: false
})

const emit = defineEmits<{
  (e: 'close'): void
}>()

const handleClose = () => {
  emit('close')
}
</script>

<style scoped>
.mobile-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-mask.show {
  opacity: 1;
}

/* 移动端适配 */
@media (max-width: 767px) {
  .mobile-mask {
    display: block;
  }
}
</style>